#include "ContextUI.h"
#include "ChatListUI.h"
#include "ChatUI.h"

#include "ui_ContextUI.h"

ContextUI::ContextUI(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ContextUI)
{
    ui->setupUi(this);

    InitUI();
}

ContextUI::~ContextUI()
{
    delete ui;
}

void ContextUI::InitUI(void){
    m_pChatListUI = new ChatListUI();
    QGridLayout* pGridLayout = new QGridLayout(ui->FriendList);
    pGridLayout->setContentsMargins(0,0,0,0);
    pGridLayout->addWidget(m_pChatListUI);

    pGridLayout = new QGridLayout(ui->MainChat);
    pGridLayout->setContentsMargins(0,0,0,0);
    m_pChatUI = new ChatUI;
    pGridLayout->addWidget(m_pChatUI);
}

void ContextUI::Test(){
    m_pChatListUI->Test();
}
